package com.wust.dao;

import com.wust.entity.CheckupRecord;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface CheckupRecordMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(CheckupRecord record);

    int insertSelective(CheckupRecord record);

    CheckupRecord selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(CheckupRecord record);

    int updateByPrimaryKey(CheckupRecord record);

    CheckupRecord selectLatestByUserId(Integer userId);

    CheckupRecord selectLatestInValidByUserId(Integer userId);

    CheckupRecord selectLatestInValidByUserIdAndTime(@Param("userId") Integer userId, @Param("time") Date time);

    List<CheckupRecord> selectAllBetweenTime(@Param("userId")Integer userId, @Param("beginTime")Date beginTime, @Param("endTime")Date endTime);

}